
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpAclsOrg.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpAclsOrgForm"
 */
public class CcpAclsOrgForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _caoGuid = null;
   private java.lang.String _unitCode = null;
   private java.lang.String _unitName = null;
   private java.lang.String _responser = null;
   private java.lang.String _unitAlias = null;
   private java.lang.String _address = null;
   private java.lang.String _tel = null;
   private java.lang.String _postCode = null;
   private java.lang.Long _totalArea = null;
   private java.lang.Long _officeArea = null;
   private java.lang.Long _plantsArea = null;
   private java.lang.Long _totalStaff = null;
   private java.lang.Long _graduate = null;
   private java.lang.Long _underGraduate = null;
   private java.lang.Long _tertiary = null;
   private java.lang.String _orgGuid = null;

   /**
    * Standard constructor.
    */
   public CcpAclsOrgForm() {
   }

   /**
    * Returns the caoGuid
    *
    * @return the caoGuid
    */
   public java.lang.String getCaoGuid() {
      return _caoGuid;
   }

   /**
    * Sets the caoGuid
    *
    * @param caoGuid the new caoGuid value
    */
   public void setCaoGuid(java.lang.String caoGuid) {
      _caoGuid = caoGuid;
   }
   /**
    * Returns the unitCode
    *
    * @return the unitCode
    */
   public java.lang.String getUnitCode() {
      return _unitCode;
   }

   /**
    * Sets the unitCode
    *
    * @param unitCode the new unitCode value
    */
   public void setUnitCode(java.lang.String unitCode) {
      _unitCode = unitCode;
   }
   /**
    * Returns the unitName
    *
    * @return the unitName
    */
   public java.lang.String getUnitName() {
      return _unitName;
   }

   /**
    * Sets the unitName
    *
    * @param unitName the new unitName value
    */
   public void setUnitName(java.lang.String unitName) {
      _unitName = unitName;
   }
   /**
    * Returns the responser
    *
    * @return the responser
    */
   public java.lang.String getResponser() {
      return _responser;
   }

   /**
    * Sets the responser
    *
    * @param responser the new responser value
    */
   public void setResponser(java.lang.String responser) {
      _responser = responser;
   }
   /**
    * Returns the unitAlias
    *
    * @return the unitAlias
    */
   public java.lang.String getUnitAlias() {
      return _unitAlias;
   }

   /**
    * Sets the unitAlias
    *
    * @param unitAlias the new unitAlias value
    */
   public void setUnitAlias(java.lang.String unitAlias) {
      _unitAlias = unitAlias;
   }
   /**
    * Returns the address
    *
    * @return the address
    */
   public java.lang.String getAddress() {
      return _address;
   }

   /**
    * Sets the address
    *
    * @param address the new address value
    */
   public void setAddress(java.lang.String address) {
      _address = address;
   }
   /**
    * Returns the tel
    *
    * @return the tel
    */
   public java.lang.String getTel() {
      return _tel;
   }

   /**
    * Sets the tel
    *
    * @param tel the new tel value
    */
   public void setTel(java.lang.String tel) {
      _tel = tel;
   }
   /**
    * Returns the postCode
    *
    * @return the postCode
    */
   public java.lang.String getPostCode() {
      return _postCode;
   }

   /**
    * Sets the postCode
    *
    * @param postCode the new postCode value
    */
   public void setPostCode(java.lang.String postCode) {
      _postCode = postCode;
   }
   /**
    * Returns the totalArea
    *
    * @return the totalArea
    */
   public java.lang.Long getTotalArea() {
      return _totalArea;
   }

   /**
    * Sets the totalArea
    *
    * @param totalArea the new totalArea value
    */
   public void setTotalArea(java.lang.Long totalArea) {
      _totalArea = totalArea;
   }
   /**
    * Returns the officeArea
    *
    * @return the officeArea
    */
   public java.lang.Long getOfficeArea() {
      return _officeArea;
   }

   /**
    * Sets the officeArea
    *
    * @param officeArea the new officeArea value
    */
   public void setOfficeArea(java.lang.Long officeArea) {
      _officeArea = officeArea;
   }
   /**
    * Returns the plantsArea
    *
    * @return the plantsArea
    */
   public java.lang.Long getPlantsArea() {
      return _plantsArea;
   }

   /**
    * Sets the plantsArea
    *
    * @param plantsArea the new plantsArea value
    */
   public void setPlantsArea(java.lang.Long plantsArea) {
      _plantsArea = plantsArea;
   }
   /**
    * Returns the totalStaff
    *
    * @return the totalStaff
    */
   public java.lang.Long getTotalStaff() {
      return _totalStaff;
   }

   /**
    * Sets the totalStaff
    *
    * @param totalStaff the new totalStaff value
    */
   public void setTotalStaff(java.lang.Long totalStaff) {
      _totalStaff = totalStaff;
   }
   /**
    * Returns the graduate
    *
    * @return the graduate
    */
   public java.lang.Long getGraduate() {
      return _graduate;
   }

   /**
    * Sets the graduate
    *
    * @param graduate the new graduate value
    */
   public void setGraduate(java.lang.Long graduate) {
      _graduate = graduate;
   }
   /**
    * Returns the underGraduate
    *
    * @return the underGraduate
    */
   public java.lang.Long getUnderGraduate() {
      return _underGraduate;
   }

   /**
    * Sets the underGraduate
    *
    * @param underGraduate the new underGraduate value
    */
   public void setUnderGraduate(java.lang.Long underGraduate) {
      _underGraduate = underGraduate;
   }
   /**
    * Returns the tertiary
    *
    * @return the tertiary
    */
   public java.lang.Long getTertiary() {
      return _tertiary;
   }

   /**
    * Sets the tertiary
    *
    * @param tertiary the new tertiary value
    */
   public void setTertiary(java.lang.Long tertiary) {
      _tertiary = tertiary;
   }
   /**
    * Returns the orgGuid
    *
    * @return the orgGuid
    */
   public java.lang.String getOrgGuid() {
      return _orgGuid;
   }

   /**
    * Sets the orgGuid
    *
    * @param orgGuid the new orgGuid value
    */
   public void setOrgGuid(java.lang.String orgGuid) {
      _orgGuid = orgGuid;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCaoGuid() == null) {
         errors.add("caoGuid", new ActionError("error.caoGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
